#ifndef UKUITASKBARPREVIEWWIDGET_H
#define UKUITASKBARPREVIEWWIDGET_H

#include <QWidget>

class UKUIWindow;
class QVBoxLayout;
class QLabel;
class UKUITaskBar;
class UKUITaskCloseButton;

class UKUITaskbarPreviewWidget : public QWidget
{
    Q_OBJECT
public:
    explicit UKUITaskbarPreviewWidget(UKUIWindow *window, UKUITaskBar * taskbar, QWidget *parent = nullptr);
    ~UKUITaskbarPreviewWidget();

    void setPreviewVisible(bool visible);

signals:

protected:
    void contextMenuEvent(QContextMenuEvent *event);
    void mousePressEvent(QMouseEvent *event);



public slots:
    void updateIcon();

    void slotUpdateTitle();
    void closeApplication();
    void maximizeApplication();
    void minimizeApplication();
    void deMaximizeApplication();
    void raiseApplication();
    /**
     * @brief setWindowKeepAbove
     * 窗口置顶
     */
    void setWindowKeepAbove();
    /**
     * @brief setWindowStatusClear
     * 取消置顶
     */
    void setWindowStatusClear();

private:
    void initUI();

    UKUIWindow* m_window;
    UKUITaskBar *m_taskbar;


    QVBoxLayout *m_mainLayout;
    QLabel *m_titleLabel;
    QLabel *m_appIconLabel;
    QLabel *mThumbnailLabel;
    UKUITaskCloseButton *mCloseBtn;

};

#endif // UKUITASKBARPREVIEWWIDGET_H
